/* Testimonial Pro Styles - Version 2.1 */
.testimonial-pro-container {
    margin: 30px 0;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

/* Grid Layout */
.testimonial-grid {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(var(--columns, 3), 1fr);
}

.testimonial-grid-1 { --columns: 1; }
.testimonial-grid-2 { --columns: 2; }
.testimonial-grid-3 { --columns: 3; }
.testimonial-grid-4 { --columns: 4; }

/* Testimonial Item */
.testimonial-item {
    background: #FFF; /* New background color */
    border-radius: 12px;
    padding: 25px; /* Slightly reduced padding */
    box-shadow: 0 4px 15px rgba(253, 216, 49, 0.15); /* Adjusted shadow to match color */
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid rgba(253, 216, 49, 0.2); /* Subtle border with accent color */
}

.testimonial-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(253, 216, 49, 0.25); /* Enhanced shadow on hover */
    border-color: rgba(253, 216, 49, 0.4);
}

.testimonial-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.testimonial-image {
    text-align: center;
    margin-bottom: 15px; /* Reduced margin */
}

.testimonial-image img {
    width: 70px; /* Smaller image */
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #FFFBE6;
    box-shadow: 0 3px 10px rgba(253, 216, 49, 0.2);
}

.testimonial-text {
    margin-bottom: 15px; /* Reduced margin */
    flex: 1;
    position: relative;
    min-height: 90px; /* Slightly reduced */
}

.testimonial-text::before {
    content: '"';
    font-size: 50px; /* Smaller quote mark */
    color: #FDD831; /* Yellow accent color */
    opacity: 0.3; /* More subtle */
    position: absolute;
    top: -15px; /* Adjusted position */
    left: -5px;
    font-family: Georgia, serif;
    line-height: 1;
    z-index: 0;
}

.testimonial-text p {
    font-style: italic;
    line-height: 1.7;
    color: #555;
    margin: 0;
    font-size: 15px; /* Slightly smaller text */
    position: relative;
    z-index: 1;
}

.testimonial-rating {
    margin-bottom: 12px; /* Reduced margin */
    text-align: center;
}

.star-rating {
    display: inline-block;
    font-size: 0;
}

.star-rating .star {
    font-size: 18px; /* Slightly smaller stars */
    color: #e0e0e0;
    margin: 0 1px; /* Reduced spacing */
    display: inline-block;
    line-height: 1;
}

.star-rating .star.filled {
    color: #FDD831; /* Yellow stars */
}

.rating-text {
    font-size: 13px; /* Smaller text */
    color: #666;
    margin-left: 6px;
    vertical-align: middle;
}

.testimonial-author {
    text-align: center;
    margin-bottom: 15px; /* Reduced margin */
}

.author-name {
    margin: 0 0 3px 0; /* Reduced margin */
    color: #333;
    font-size: 16px; /* Smaller */
    font-weight: 600;
}

.author-position,
.author-company {
    display: block;
    color: #666;
    font-size: 13px; /* Smaller */
    line-height: 1.3;
}

.author-company {
    font-weight: 600;
    color: #333; /* Darker for better contrast */
    margin-top: 2px;
}

.testimonial-readmore {
    text-align: center;
    margin-top: auto;
    padding-top: 15px; /* Reduced padding */
    border-top: 1px solid rgba(253, 216, 49, 0.2);
}

/* VIEW MORE BUTTON - UPDATED */
.view-more-btn {
    display: inline-block;
    padding: 6px 16px; /* Smaller padding */
    background: #FDD831; /* Yellow button */
    color: #333; /* Dark text for contrast */
    text-decoration: none;
    border-radius: 4px; /* Slightly smaller radius */
    transition: all 0.3s ease;
    font-size: 13px; /* Smaller text */
    font-weight: 600; /* Bold text */
    border: 2px solid #FDD831;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.view-more-btn:hover {
    background: #fff;
    color: #333;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(253, 216, 49, 0.3);
}

/* ===== SLIDER LAYOUT ===== */
.testimonial-slider {
    position: relative;
    overflow: hidden;
    padding: 0 30px; /* Reduced padding for arrows */
    width: 100%;
}

.testimonial-slider .testimonial-slides-container {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Faster transition */
    will-change: transform;
}

.testimonial-slider .testimonial-slide {
    flex: 0 0 100%;
    box-sizing: border-box;
    padding: 0 10px; /* Reduced padding between slides */
    display: flex;
    justify-content: center;
}

.testimonial-slider.slider-initialized .testimonial-slides-container {
    transform: translate3d(0, 0, 0);
}

.testimonial-slider .testimonial-item {
    width: 100%;
    max-width: 100%;
}

/* SLIDER NAVIGATION ARROWS - UPDATED */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #fff; /* Yellow background */
    color: #333; /* Dark arrow */
    border: none;
    width: 36px; /* Smaller width */
    height: 36px; /* Smaller height */
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px; /* Smaller arrow */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease; /* Faster transition */
    z-index: 10;
    opacity: 0.9;
    padding: 0; /* No padding */
    box-shadow: 0 2px 5px rgba(253, 216, 49, 0.3);
}

.slider-nav:hover {
    opacity: 1;
    background: #f4cf2a; /* Slightly darker yellow */
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 3px 8px rgba(253, 216, 49, 0.4);
}

.slider-prev {
    left: 5px; /* Closer to edge */
}

.slider-next {
    right: 5px; /* Closer to edge */
}

/* Slider Dots - UPDATED */
.slider-dots {
    display: flex;
    justify-content: center;
    margin-top: 15px; /* Reduced margin */
    gap: 6px; /* Smaller gap */
}

.slider-dot {
    width: 10px; /* Smaller dots */
    height: 10px;
    border-radius: 50%;
    background: #e0e0e0;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.slider-dot:hover,
.slider-dot.active {
    background: #FDD831; /* Yellow dots */
    transform: scale(1.1);
}

/* Categories List */
.testimonial-categories {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.testimonial-categories li {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(253, 216, 49, 0.2);
}

.testimonial-categories li:last-child {
    border-bottom: none;
}

.testimonial-categories a {
    text-decoration: none;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.testimonial-categories a:hover {
    color: #FDD831;
}

.testimonial-categories .count {
    background: #FDD831;
    color: #333;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

/* Single Testimonial Page */
.testimonial-single-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.testimonial-single-header {
    text-align: center;
    margin-bottom: 30px; /* Reduced margin */
}

.testimonial-single-image img {
    width: 120px; /* Smaller image */
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #FFFBE6;
    box-shadow: 0 4px 15px rgba(253, 216, 49, 0.2);
    margin-bottom: 15px;
}

.testimonial-single-title {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 1.8em; /* Slightly smaller */
}

.testimonial-position {
    font-size: 16px; /* Smaller */
    color: #666;
    margin-bottom: 3px;
}

.testimonial-company {
    font-size: 14px; /* Smaller */
    color: #333;
    font-weight: 600;
    margin-bottom: 12px;
}

.testimonial-company a {
    color: inherit;
    text-decoration: none;
}

.testimonial-company a:hover {
    color: #FDD831;
    text-decoration: underline;
}

.testimonial-single-content {
    background: #FFFBE6;
    padding: 30px; /* Reduced padding */
    border-radius: 10px; /* Slightly smaller radius */
    box-shadow: 0 4px 15px rgba(253, 216, 49, 0.15);
    font-size: 16px; /* Smaller text */
    line-height: 1.7;
    color: #555;
    position: relative;
}

.testimonial-single-content::before {
    content: '"';
    font-size: 100px; /* Smaller quote */
    color: #FDD831;
    opacity: 0.15; /* More subtle */
    position: absolute;
    top: -20px;
    left: 15px;
    font-family: Georgia, serif;
    line-height: 1;
}

/* BACK TO TESTIMONIALS BUTTON - UPDATED */
.back-to-testimonials {
    display: inline-block;
    padding: 8px 20px; /* Smaller padding */
    background: #FFFBE6;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: 2px solid #FDD831;
    font-weight: 600;
    font-size: 13px;
}

.back-to-testimonials:hover {
    background: #FDD831;
    color: #333;
    border-color: #FDD831;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(253, 216, 49, 0.3);
}

/* Archive Page */
.testimonial-archive-header {
    text-align: center;
    margin-bottom: 30px;
}

.testimonial-archive-title {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 2.2em;
}

.testimonial-archive-description {
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    font-size: 1em;
}

.testimonial-archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); /* Slightly smaller min */
    gap: 25px; /* Reduced gap */
    margin: 30px 0;
}

/* No Results Message */
.testimonial-no-results {
    text-align: center;
    padding: 30px;
    color: #666;
    font-style: italic;
    background: #FFFBE6;
    border-radius: 8px;
    border: 1px dashed rgba(253, 216, 49, 0.3);
    width: 100%;
}

/* Loading State */
.testimonial-slider .testimonial-slides-container.loading {
    opacity: 0.6;
}

/* Touch Device Improvements */
@media (hover: none) and (pointer: coarse) {
    .slider-nav {
        width: 40px; /* Smaller for touch */
        height: 40px;
        font-size: 20px;
    }
    
    .slider-dot {
        width: 12px;
        height: 12px;
    }
    
    .view-more-btn {
        padding: 8px 18px; /* Slightly larger for touch */
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .testimonial-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .testimonial-slider .testimonial-slide {
        flex: 0 0 calc(100% / 2);
    }
}

@media (max-width: 992px) {
    .testimonial-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .testimonial-slider .testimonial-slide {
        flex: 0 0 100%;
    }
    
    .testimonial-archive-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .testimonial-slider {
        padding: 0 25px;
    }
}

@media (max-width: 768px) {
    .testimonial-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonial-slider {
        padding: 0 15px; /* Less padding on mobile */
    }
    
    .slider-nav {
        width: 32px; /* Even smaller on mobile */
        height: 32px;
        font-size: 16px;
    }
    
    .slider-prev {
        left: 2px;
    }
    
    .slider-next {
        right: 2px;
    }
    
    .testimonial-archive-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonial-single-content {
        padding: 20px;
        font-size: 15px;
    }
    
    .testimonial-item {
        padding: 20px;
    }
    
    .testimonial-text::before {
        font-size: 40px;
        top: -10px;
        left: -3px;
    }
}

@media (max-width: 480px) {
    .testimonial-text p {
        font-size: 14px;
    }
    
    .author-name {
        font-size: 15px;
    }
    
    .view-more-btn {
        padding: 5px 14px;
        font-size: 12px;
    }
    
    .testimonial-slider {
        padding: 0 10px;
    }
    
    .slider-nav {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .testimonial-image img {
        width: 60px;
        height: 60px;
    }
    
    .testimonial-single-image img {
        width: 100px;
        height: 100px;
    }
}

/* Print Styles */
@media print {
    .testimonial-pro-container {
        break-inside: avoid;
    }
    
    .slider-nav,
    .slider-dots {
        display: none !important;
    }
    
    .testimonial-slider .testimonial-slides-container {
        transform: none !important;
        flex-wrap: wrap;
    }
    
    .testimonial-slider .testimonial-slide {
        flex: 0 0 100%;
        margin-bottom: 15px;
    }
    
    .view-more-btn,
    .back-to-testimonials {
        border: 1px solid #ccc !important;
        background: none !important;
        color: #000 !important;
    }
}

/* Focus States for Accessibility */
.slider-nav:focus,
.view-more-btn:focus,
.back-to-testimonials:focus,
.slider-dot:focus {
    outline: 2px solid #FDD831;
    outline-offset: 2px;
}

/* Animation for rating stars */
@keyframes starPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.star-rating .star.filled {
    animation: starPulse 0.5s ease;
}

/* Smooth hover transitions */
.testimonial-item,
.view-more-btn,
.slider-nav,
.back-to-testimonials {
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Enhanced active states */
.view-more-btn:active,
.slider-nav:active,
.slider-dot:active {
    transform: translateY(0) scale(0.98);
}